<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>外边距合并-嵌套块级元素垂直外边距塌陷</title>
<style>
    .father {
        width: 400px;
        height: 400px;
        background-color: aqua;
        margin-top: 50px;
        /* border: 1px solid red; */
        /* padding: 1px; */
        overflow: hidden;
    }
    .son {
        width: 200px;
        height: 200px;
        background-color: darkorange;
        margin-top: 100px;
    }
</style>
</head>
<body>
    <div class="father">
        <div class="son"></div>
    </div>
    <img src="img/塌陷1.png" width="100%">
    <img src="img/塌陷2.png" width="100%">
</body>
</html>